<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8"/>
        <title>运算符</title>
    </head>
    <body>
        <script type="text/javascript">
        var man = "男生";
        var age = 2;
        var result = man&&age;
        if(man=="男生"&&age>=18){
            console.log("可以参军！");
        }else{
            console.log("达没参军！");
        }
        

        var man = prompt("请输入你带的东西？");
        if(man=="钱包"||man=="手机"){
            console.log("可以买可乐！");
        }else{
            console.log("不可以！");
        }
        

        var man = "男生";
        var result = man=="男生"?"小哥哥":"小姐姐";
        console.log(result);
        </script>
    </body>
</html>